TIS-100 | Signal Amplifier

Tasks

For the second challenge “Signal Amplifier” (Segment 10981) we need to complete the following tasks:

Solution

In the “Signal Amplifier” challenge, we are introduced to the ADD instruction and the ACC register. As you can see in the image above the output is expecting the value to be double that of the input. We can start by moving the value from IN.A to the ACC register in node #2. After moving the input value to ACC we want to double the value, we can do this by adding the value stored in the ACC register to itself. Once the value is doubled we can then transfer that value to the output. The sequence of commands to solve for OUT.A are:

MOV UP, ACC     #N2
ADD ACC         #N2
MOV ACC, DOWN   #N2
MOV UP, DOWN    #N6
MOV UP, RIGHT   #N10
MOV LEFT, DOWN  #N11

After completing the following sequences, you can now press F5 to run and solve the program!


Connect With Me 😊

Website Website Website Website